package com.chenyaowei.member.service.impl;

import java.util.List;
import com.chenyaowei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenyaowei.member.mapper.CywGrowthChangeHistoryMapper;
import com.chenyaowei.member.domain.CywGrowthChangeHistory;
import com.chenyaowei.member.service.ICywGrowthChangeHistoryService;

/**
 * 成长值变化历史记录Service业务层处理
 * 
 * @author 陈耀威
 * @date 2023-11-28
 */
@Service
public class CywGrowthChangeHistoryServiceImpl implements ICywGrowthChangeHistoryService 
{
    @Autowired
    private CywGrowthChangeHistoryMapper cywGrowthChangeHistoryMapper;

    /**
     * 查询成长值变化历史记录
     * 
     * @param id 成长值变化历史记录主键
     * @return 成长值变化历史记录
     */
    @Override
    public CywGrowthChangeHistory selectCywGrowthChangeHistoryById(Long id)
    {
        return cywGrowthChangeHistoryMapper.selectCywGrowthChangeHistoryById(id);
    }

    /**
     * 查询成长值变化历史记录列表
     * 
     * @param cywGrowthChangeHistory 成长值变化历史记录
     * @return 成长值变化历史记录
     */
    @Override
    public List<CywGrowthChangeHistory> selectCywGrowthChangeHistoryList(CywGrowthChangeHistory cywGrowthChangeHistory)
    {
        return cywGrowthChangeHistoryMapper.selectCywGrowthChangeHistoryList(cywGrowthChangeHistory);
    }

    /**
     * 新增成长值变化历史记录
     * 
     * @param cywGrowthChangeHistory 成长值变化历史记录
     * @return 结果
     */
    @Override
    public int insertCywGrowthChangeHistory(CywGrowthChangeHistory cywGrowthChangeHistory)
    {
        cywGrowthChangeHistory.setCreateTime(DateUtils.getNowDate());
        return cywGrowthChangeHistoryMapper.insertCywGrowthChangeHistory(cywGrowthChangeHistory);
    }

    /**
     * 修改成长值变化历史记录
     * 
     * @param cywGrowthChangeHistory 成长值变化历史记录
     * @return 结果
     */
    @Override
    public int updateCywGrowthChangeHistory(CywGrowthChangeHistory cywGrowthChangeHistory)
    {
        return cywGrowthChangeHistoryMapper.updateCywGrowthChangeHistory(cywGrowthChangeHistory);
    }

    /**
     * 批量删除成长值变化历史记录
     * 
     * @param ids 需要删除的成长值变化历史记录主键
     * @return 结果
     */
    @Override
    public int deleteCywGrowthChangeHistoryByIds(Long[] ids)
    {
        return cywGrowthChangeHistoryMapper.deleteCywGrowthChangeHistoryByIds(ids);
    }

    /**
     * 删除成长值变化历史记录信息
     * 
     * @param id 成长值变化历史记录主键
     * @return 结果
     */
    @Override
    public int deleteCywGrowthChangeHistoryById(Long id)
    {
        return cywGrowthChangeHistoryMapper.deleteCywGrowthChangeHistoryById(id);
    }
}
